package com.tspp.dao;

public class DaoException extends Exception {

    private Throwable throwable;

    /** Error number of reaching max entrants in group*/
    public static String MAX_ENTRANTS_IN_GROUP = "-20002";

    /** Error number of reaching max entrantson speciality*/
    public static String MAX_ENTRANTS_ON_SPECIALITY = "-20001";

    /** Error number when inserting null into value*/
    public static String NULL_VALUE = "-01400";


    /**
     * Method 'DaoException'
     *
     * @param message
     */
    public DaoException(String message) {
        super(message);
    }

    /**
     * Method 'DaoException'
     *
     * @param message
     * @param throwable
     */
    public DaoException(String message, Throwable throwable) {
        super(message);
        this.throwable = throwable;
    }

    /**
     * Method 'getCause'
     *
     * @return Throwable
     */
    @Override
    public Throwable getCause() {
        return throwable;
    }
}

